//
// Created by bbnf on 09.06.2024.
//

#ifndef TODOAPPCPP_TODO_STORAGE_H
#define TODOAPPCPP_TODO_STORAGE_H

#include "storage_pch.h"



namespace TodoApp::Storage {
    class TodoStorage {
    public:
        enum TodoFilter : Int8 {
            All, OnlyDone, LowPriority, MediumPriority, HighPriority
        };
    private:
        std::vector<Todo *> m_todos;
        TodoFilter m_filter = All;
    public:
        explicit TodoStorage(const std::vector<Todo*> &todos);
        ~TodoStorage();

        void setFilter(TodoFilter filter);

        void clearFilter();

        [[nodiscard]] auto todos() -> std::vector<Todo*>;

        [[nodiscard]] auto todos(TodoFilter filter) -> std::vector<Todo*>;
    };
}  // namespace TodoApp::Storage

#endif //TODOAPPCPP_TODO_STORAGE_H
